<template>
  <view class="charts-box">
    <qiun-data-charts type="column" :chartData="chartData" />
  </view>
</template>

<script setup>
import {onReady} from "@dcloudio/uni-app"; // 在语法糖的背景下，使用 uni-app 的钩子需要引入

let chartData = reactive({
  categories: ["2016","2017","2018","2019","2020","2021"],
  series: [
    {
      name: "目标值",
      data: [35,36,31,33,13,34]
    },
    {
      name: "完成量",
      data: [18,27,21,24,6,28]
    }
  ]
})
const getServerData = () => {
  chartData.series[0].name = 'sad'
}
onReady(() => {
  getServerData()
})
/*
* https://www.ucharts.cn/v2/#/guide/index
* */
</script>

<style lang="scss" scoped>
.charts-box {
  width: 100%;
  height: 300px;
}
</style>
